use std::fmt::Debug;

#[derive(Debug, PartialEq, Eq)]
pub enum HdcErrorKind {
    HdcNotFound,
    HdcPermissionDenied,
    HdcConnectionRefused,
    HdcConnectionReset,
    HdcHostUnreachable,
    HdcNetworkUnreachable,
    HdcConnectionAborted,
    HdcNotConnected,
    HdcAddrInUse,
    HdcAddrNotAvailable,
    HdcNetworkDown,
    HdcBrokenPipe,
    HdcAlreadyExists,
    HdcWouldBlock,
    HdcNotADirectory,
    HdcIsADirectory,
    HdcDirectoryNotEmpty,
    HdcReadOnlyFilesystem,
    HdcFilesystemLoop,
    HdcStaleNetworkFileHandle,
    HdcInvalidInput,
    HdcInvalidData,
    HdcTimedOut,
    HdcWriteZero,
    HdcStorageFull,
    HdcNotSeekable,
    HdcFilesystemQuotaExceeded,
    HdcFileTooLarge,
    HdcResourceBusy,
    HdcExecutableFileBusy,
    HdcDeadlock,
    HdcCrossesDevices,
    HdcTooManyLinks,
    HdcInvalidFilename,
    HdcArgumentListTooLong,
    HdcInterrupted,
    HdcUnsupported,
    HdcUnexpectedEof,
    HdcOutOfMemory,
    HdcOther,
    HdcUncategorized,
    HdcClose,
}

#[derive(Debug)]
pub struct HdcError {
    pub kind: HdcErrorKind,
    pub description: String,
}

impl HdcError {
    pub fn new(kind: HdcErrorKind, description: String) -> Self {
        Self { kind, description }
    }
}
